package com.oocl.crm.db;

import com.oocl.crm.base.DLinkedList;
import com.oocl.crm.base.DNode;
import com.oocl.crm.pojo.User;

/**
 * 用户链表
 * 
 * @author GANAB
 * 
 */
public class UserLinkedList extends DLinkedList<User> {
	
	public UserLinkedList() {}
	
	/**
	 * 判断用户是否存在
	 * @param data
	 * @return
	 */
	public boolean isExist(User user){
		DNode<User> temp = this.getFirst();
		while (temp != null) {
			if(temp.data.getId() == user.getId()){
				return true;
			}
			temp = temp.next;
		}
		return false;
	}
}
